package com.zatech.cgnci.project.base.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.Objects;


@Getter
@AllArgsConstructor
public enum BillStatusEnum {

    UNSETTLED("01", "未结算"),
    SETTLED("02", "已结算"),
    IN_SETTLEMENT("03", "结算中"),
    SECTION("04", "部分结算"),
    COLLECTION_CONFIRMATION("05","收款确认"),
    PAYMENT_CONFIRMATION("06","支付确认"),
    REVIEWED("07", "待审核"),
    REJECT("08", "审核驳回"),
    CHECKING("07", "审核中"),
    ;

    public static BillStatusEnum getEnumByCode(String code) {
        return Arrays.stream(values()).filter(e -> Objects.equals(e.getCode(), code)).findAny().orElse(null);
    }

    private String code;
    private String descr;
}
